
#ifndef MATERIAL_H
#define MATERIAL_H

/*
    一个基类，然后派生出几种类型：


派生类中，除了absorb之外均需要设置slopeerror

slopeerror不需要写专门的类，这里只设置了一个枚举类----与TonatiuhPP中类似
*/

#include <algorithm/shared/utils/Vec3.h>

#include <boost/describe.hpp>

namespace solar
{

    enum class MaterialType
    {
        kMaterialAbsorb,
        kMaterialReflect,
        kMaterialRefract
    };
    BOOST_DESCRIBE_ENUM(MaterialType, kMaterialAbsorb, kMaterialReflect, kMaterialRefract)
    enum class SlopeErrorType
    {
        kGaussianSlopeError,
        kPillboxSlopeError
    };
    BOOST_DESCRIBE_ENUM(SlopeErrorType, kGaussianSlopeError, kPillboxSlopeError)

    class Material
    {
        public:
            [[nodiscard]] virtual auto getType() const -> MaterialType = 0;

            // static auto getMaterialType(const std::string& str) -> int;
            // static auto getSlopeErrorType(const std::string& str) -> int;
    };
} // namespace solar
#endif
